# Maintainer: Alexey Pavlov <alexpux@gmail.com>
# Maintainer: Ray Donnelly <mingw.android@gmail.com>
# Contributor: Saul Ibarra Corretge <saghul@gmail.com>
# Contributor: Frode Solheim <frode@fs-uae.net>

_primary_python="yes"
_pybasever=3.9
_realname=python

if [[ "${_primary_python}" == "yes" ]]; then
  pkgbase="mingw-w64-${_realname}"
  pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
  provides=("${MINGW_PACKAGE_PREFIX}-python3"
            "${MINGW_PACKAGE_PREFIX}-python${_pybasever}")
  conflicts=("${MINGW_PACKAGE_PREFIX}-python3"
             "${MINGW_PACKAGE_PREFIX}-python${_pybasever}"
            "${MINGW_PACKAGE_PREFIX}-python2<2.7.16-7")
  replaces=("${MINGW_PACKAGE_PREFIX}-python3"
            "${MINGW_PACKAGE_PREFIX}-python${_pybasever}")
else
  pkgbase="mingw-w64-${_realname}${_pybasever}"
  pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}${_pybasever}")
fi
pkgver=${_pybasever}.10
pkgrel=2
pkgdesc="A high-level scripting language (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
license=('PSF')
url="https://www.python.org/"
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
         "${MINGW_PACKAGE_PREFIX}-expat"
         "${MINGW_PACKAGE_PREFIX}-bzip2"
         "${MINGW_PACKAGE_PREFIX}-libffi"
         "${MINGW_PACKAGE_PREFIX}-mpdecimal"
         "${MINGW_PACKAGE_PREFIX}-ncurses"
         "${MINGW_PACKAGE_PREFIX}-openssl"
         "${MINGW_PACKAGE_PREFIX}-sqlite3"
         "${MINGW_PACKAGE_PREFIX}-tcl"
         "${MINGW_PACKAGE_PREFIX}-tk"
         "${MINGW_PACKAGE_PREFIX}-zlib"
         "${MINGW_PACKAGE_PREFIX}-xz"
         "${MINGW_PACKAGE_PREFIX}-tzdata")
makedepends=(
  "${MINGW_PACKAGE_PREFIX}-cc"
  "${MINGW_PACKAGE_PREFIX}-autotools"
  "autoconf-archive"
)
options=('makeflags') # 'debug' '!strip')
source=("https://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz"
        0001-sysconfig-make-_sysconfigdata.py-relocatable.patch
        0002-restore-setup-config.patch
        0003-build-add-with-nt-threads-and-make-it-default-on-min.patch
        0004-MINGW-translate-gcc-internal-defines-to-python-platf.patch
        0005-MINGW-configure-MACHDEP-and-platform-for-build.patch
        0006-MINGW-preset-configure-defaults.patch
        0007-MINGW-configure-largefile-support-for-windows-builds.patch
        0008-MINGW-add-srcdir-PC-to-CPPFLAGS.patch
        0009-MINGW-init-system-calls.patch
        0010-MINGW-build-in-windows-modules-winreg.patch
        0011-MINGW-determine-if-pwdmodule-should-be-used.patch
        0012-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch
        0013-MINGW-configure-for-shared-build.patch
        0014-MINGW-dynamic-loading-support.patch
        0015-MINGW-ignore-main-program-for-frozen-scripts.patch
        0016-MINGW-setup-_multiprocessing-module.patch
        0017-MINGW-setup-select-module.patch
        0018-MINGW-setup-_ctypes-module-with-system-libffi.patch
        0019-MINGW-defect-winsock2-and-setup-_socket-module.patch
        0020-MINGW-exclude-unix-only-modules.patch
        0021-MINGW-setup-msvcrt-and-_winapi-modules.patch
        0022-sysconfig-MINGW-build-extensions-with-GCC.patch
        0023-MINGW-setup-_ssl-module.patch
        0024-MINGW-generalization-of-posix-build-in-sysconfig.py.patch
        0025-MINGW-support-stdcall-without-underscore.patch
        0026-use-replace-instead-rename-to-avoid-failure-on-windo.patch
        0027-MINGW-customize-site.patch
        0028-add-python-config-sh.patch
        0029-cross-darwin-feature.patch
        0030-mingw-system-libffi.patch
        0031-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch
        0032-mingw-use-posix-getpath.patch
        0033-mingw-add-ModuleFileName-dir-to-PATH.patch
        0034-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch
        0035-msys-cygwin-semi-native-build-sysconfig.patch
        0036-sysconfig-mingw-sysconfig-like-posix.patch
        0037-build-_winapi-earlier-so-we-can-use-it-in-distutils-.patch
        0038-cross-dont-add-multiarch-paths-if-cross-compiling.patch
        0039-mingw-use-backslashes-in-compileall-py.patch
        0040-msys-convert_path-fix-and-root-hack.patch
        0041-allow-static-tcltk.patch
        0042-mingw-pdcurses_ISPAD.patch
        0043-grammar-fixes.patch
        0044-builddir-fixes.patch
        0045-msys-monkeypatch-os-system-via-sh-exe.patch
        0046-msys-replace-slashes-used-in-io-redirection.patch
        0047-remove_path_max.default.patch
        0048-dont-link-with-gettext.patch
        0049-ctypes-python-dll.patch
        0050-gdbm-module-includes.patch
        0051-use-gnu_printf-in-format.patch
        0052-mingw-fix-ssl-dont-use-enum_certificates.patch
        0053-fix-using-dllhandle-and-winver-mingw.patch
        0054-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch
        0055-MINGW-link-with-additional-library.patch
        0056-install-msilib.patch
        0057-fix-signal-module-build.patch
        0058-build-build-winconsoleio-and-_testconsole.patch
        0059-expose-sem_unlink.patch
        0060-cygpty-isatty.patch
        0061-disable-broken-gdbm-module.patch
        0062-build-link-win-resource-files-and-build-pythonw.patch
        0063-3.7-mpdec-mingw.patch
        0064-disable-readline.patch
        0065-fix-isselectable.patch
        0066-use-_wcsnicmp-instead-wcsncasecmp.patch
        0067-_xxsubinterpretersmodule.patch
        0068-sqlite3-module-defines.patch
        0069-configure.ac-fix-inet_pton-check.patch
        0070-set-venv-activate-path-unix.patch
        0071-venv-creation-fixes.patch
        0072-pass-gen-profile-ldflags.patch
        0073-pkg-config-windows-must-link-ext-with-python-lib.patch
        0074-importlib-bootstrap-path-sep.patch
        0075-pathlib-path-sep.patch
        0076-warnings-fixes.patch
        0077-fix-build-testinternalcapi.patch
        0078-extend-MS_WINDOWS-flag.patch
        0079-clang-arm64.patch
        0080-configure.ac-set-MINGW-stack-reserve.patch
        0081-Don-t-use-os.pathsep-to-find-EOF.patch
        0082-Fix-extension-suffix-for-c-extensions-on-mingw.patch
        0083-Change-the-get_platform-method-in-sysconfig.patch
        0084-distutils-compiler-customize-mingw-cygwin-compilers.patch
        0085-distutils-compiler-enable-new-dtags.patch
        0086-distutils-MINGW-build-extensions-with-GCC.patch
        0087-distutils-use-Mingw32CCompiler-as-default-compiler-f.patch
        0088-distutils-find-import-library.patch
        0089-distutils-avoid-circular-dependency-from-time-module.patch
        0090-distutils-generalization-of-posix-build-in-distutils.patch
        0091-distutils-mingw-sysconfig-like-posix.patch
        0092-distutils-get_versions-fixes.patch
        0093-distutils-install-layout-as-posix.patch
        0094-distutils-msys-convert_path-fix-and-root-hack.patch
        0095-distutils-mingw-build-optimized-ext.patch
        0096-distutils-cygwinccompiler-dont-strip-modules-if-pyde.patch
        0097-distutils-get-compilers-from-env-vars.patch
        0098-distutils-add-windmc-to-cygwinccompiler.patch
        0099-distutils-fix-msvc9-import.patch
        0100-distutils-mingw-add-LIBPL-to-library-dirs.patch
        0101-distutils-Change-the-get_platform-method-in-distutil.patch
        0102-build-Fix-ncursesw-include-lookup.patch
        0103-tests-fix-test_bytes.patch
        0104-time-fix-strftime-not-raising-for-invalid-year-value.patch
        0105-ctypes-find_library-c-should-return-None-with-ucrt.patch
        0106-build-Disable-checks-for-dlopen-dlfcn.patch
        0107-Fix-install-location-of-the-import-library.patch
        0108-Set-MSYS2_ARG_CONV_EXCL-for-the-shared-Python-module.patch
        0109-build-Integrate-venvlauncher-build-installation-into.patch
        0110-configure.ac-set-_WIN32_WINNT-version.patch
        0111-configure.ac-don-t-check-for-clock_-functions.patch
        0112-expanduser-normpath-paths-coming-from-env-vars.patch
        0113-Add-support-for-Windows-7-Python-3.9.patch
        0114-Commit-regenerated-importlib.patch
        0115-CI-test-the-build-and-add-some-mingw-specific-tests.patch
        0116-decimal-backport-build-fixes.patch
        0117-smoketests-test-that-_decimal-exists.patch
        0118-Prefer-sysconfig.python_build.patch
        0119-distutils-remove-checks-for-ancient-gcc-binutils.patch
        0120-distutils-split-CC-env-var-before-passing-to-subproc.patch
        0121-_testconsole.c-Fix-casing-path-sep.patch
        0122-Return-consistent-architecture-markers-for-python-on.patch
        0123-distutils-add-back-gcc_version.patch
        0124-fix-mingw-cross-compiling-in-setup.py.patch
        0125-Use-actions-setup-python-for-setting-up-correct-vers.patch
        0126-Fix-buffer-overflow-in-Py_GetSepW.patch
        0127-Remove-unnecessary-strlen-in-Py_NormalizeSepsW.patch
        0128-handle-ncursesw-pkg-config-when-cross-compiling.patch)

# Helper macros to help make tasks easier #
apply_patch_with_msg() {
  for _patch in "$@"
  do
    msg2 "Applying ${_patch}"
    patch -Nbp1 -i "${srcdir}/${_patch}"
  done
}

prepare() {
  cd "${srcdir}/Python-${pkgver}"

 apply_patch_with_msg 0001-sysconfig-make-_sysconfigdata.py-relocatable.patch \
  0002-restore-setup-config.patch \
  0003-build-add-with-nt-threads-and-make-it-default-on-min.patch \
  0004-MINGW-translate-gcc-internal-defines-to-python-platf.patch \
  0005-MINGW-configure-MACHDEP-and-platform-for-build.patch \
  0006-MINGW-preset-configure-defaults.patch \
  0007-MINGW-configure-largefile-support-for-windows-builds.patch \
  0008-MINGW-add-srcdir-PC-to-CPPFLAGS.patch \
  0009-MINGW-init-system-calls.patch \
  0010-MINGW-build-in-windows-modules-winreg.patch \
  0011-MINGW-determine-if-pwdmodule-should-be-used.patch \
  0012-issue6672-v2-Add-Mingw-recognition-to-pyport.h-to-al.patch \
  0013-MINGW-configure-for-shared-build.patch \
  0014-MINGW-dynamic-loading-support.patch \
  0015-MINGW-ignore-main-program-for-frozen-scripts.patch \
  0016-MINGW-setup-_multiprocessing-module.patch \
  0017-MINGW-setup-select-module.patch \
  0018-MINGW-setup-_ctypes-module-with-system-libffi.patch \
  0019-MINGW-defect-winsock2-and-setup-_socket-module.patch \
  0020-MINGW-exclude-unix-only-modules.patch \
  0021-MINGW-setup-msvcrt-and-_winapi-modules.patch \
  0022-sysconfig-MINGW-build-extensions-with-GCC.patch \
  0023-MINGW-setup-_ssl-module.patch \
  0024-MINGW-generalization-of-posix-build-in-sysconfig.py.patch \
  0025-MINGW-support-stdcall-without-underscore.patch \
  0026-use-replace-instead-rename-to-avoid-failure-on-windo.patch \
  0027-MINGW-customize-site.patch \
  0028-add-python-config-sh.patch \
  0029-cross-darwin-feature.patch \
  0030-mingw-system-libffi.patch \
  0031-msys-mingw-prefer-unix-sep-if-MSYSTEM.patch \
  0032-mingw-use-posix-getpath.patch \
  0033-mingw-add-ModuleFileName-dir-to-PATH.patch \
  0034-mingw-add-BUILDIN_WIN32_MODULEs-time-msvcrt.patch \
  0035-msys-cygwin-semi-native-build-sysconfig.patch \
  0036-sysconfig-mingw-sysconfig-like-posix.patch \
  0037-build-_winapi-earlier-so-we-can-use-it-in-distutils-.patch \
  0038-cross-dont-add-multiarch-paths-if-cross-compiling.patch \
  0039-mingw-use-backslashes-in-compileall-py.patch \
  0040-msys-convert_path-fix-and-root-hack.patch \
  0041-allow-static-tcltk.patch \
  0042-mingw-pdcurses_ISPAD.patch \
  0043-grammar-fixes.patch \
  0044-builddir-fixes.patch \
  0045-msys-monkeypatch-os-system-via-sh-exe.patch \
  0046-msys-replace-slashes-used-in-io-redirection.patch \
  0047-remove_path_max.default.patch \
  0048-dont-link-with-gettext.patch \
  0049-ctypes-python-dll.patch \
  0050-gdbm-module-includes.patch \
  0051-use-gnu_printf-in-format.patch \
  0052-mingw-fix-ssl-dont-use-enum_certificates.patch \
  0053-fix-using-dllhandle-and-winver-mingw.patch \
  0054-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch \
  0055-MINGW-link-with-additional-library.patch \
  0056-install-msilib.patch \
  0057-fix-signal-module-build.patch \
  0058-build-build-winconsoleio-and-_testconsole.patch \
  0059-expose-sem_unlink.patch \
  0060-cygpty-isatty.patch \
  0061-disable-broken-gdbm-module.patch \
  0062-build-link-win-resource-files-and-build-pythonw.patch \
  0063-3.7-mpdec-mingw.patch \
  0064-disable-readline.patch \
  0065-fix-isselectable.patch \
  0066-use-_wcsnicmp-instead-wcsncasecmp.patch \
  0067-_xxsubinterpretersmodule.patch \
  0068-sqlite3-module-defines.patch \
  0069-configure.ac-fix-inet_pton-check.patch \
  0070-set-venv-activate-path-unix.patch \
  0071-venv-creation-fixes.patch \
  0072-pass-gen-profile-ldflags.patch \
  0073-pkg-config-windows-must-link-ext-with-python-lib.patch \
  0074-importlib-bootstrap-path-sep.patch \
  0075-pathlib-path-sep.patch \
  0076-warnings-fixes.patch \
  0077-fix-build-testinternalcapi.patch \
  0078-extend-MS_WINDOWS-flag.patch \
  0079-clang-arm64.patch \
  0080-configure.ac-set-MINGW-stack-reserve.patch \
  0081-Don-t-use-os.pathsep-to-find-EOF.patch \
  0082-Fix-extension-suffix-for-c-extensions-on-mingw.patch \
  0083-Change-the-get_platform-method-in-sysconfig.patch \
  0084-distutils-compiler-customize-mingw-cygwin-compilers.patch \
  0085-distutils-compiler-enable-new-dtags.patch \
  0086-distutils-MINGW-build-extensions-with-GCC.patch \
  0087-distutils-use-Mingw32CCompiler-as-default-compiler-f.patch \
  0088-distutils-find-import-library.patch \
  0089-distutils-avoid-circular-dependency-from-time-module.patch \
  0090-distutils-generalization-of-posix-build-in-distutils.patch \
  0091-distutils-mingw-sysconfig-like-posix.patch \
  0092-distutils-get_versions-fixes.patch \
  0093-distutils-install-layout-as-posix.patch \
  0094-distutils-msys-convert_path-fix-and-root-hack.patch \
  0095-distutils-mingw-build-optimized-ext.patch \
  0096-distutils-cygwinccompiler-dont-strip-modules-if-pyde.patch \
  0097-distutils-get-compilers-from-env-vars.patch \
  0098-distutils-add-windmc-to-cygwinccompiler.patch \
  0099-distutils-fix-msvc9-import.patch \
  0100-distutils-mingw-add-LIBPL-to-library-dirs.patch \
  0101-distutils-Change-the-get_platform-method-in-distutil.patch \
  0102-build-Fix-ncursesw-include-lookup.patch \
  0103-tests-fix-test_bytes.patch \
  0104-time-fix-strftime-not-raising-for-invalid-year-value.patch \
  0105-ctypes-find_library-c-should-return-None-with-ucrt.patch \
  0106-build-Disable-checks-for-dlopen-dlfcn.patch \
  0107-Fix-install-location-of-the-import-library.patch \
  0108-Set-MSYS2_ARG_CONV_EXCL-for-the-shared-Python-module.patch \
  0109-build-Integrate-venvlauncher-build-installation-into.patch \
  0110-configure.ac-set-_WIN32_WINNT-version.patch \
  0111-configure.ac-don-t-check-for-clock_-functions.patch \
  0112-expanduser-normpath-paths-coming-from-env-vars.patch \
  0113-Add-support-for-Windows-7-Python-3.9.patch \
  0114-Commit-regenerated-importlib.patch \
  0115-CI-test-the-build-and-add-some-mingw-specific-tests.patch \
  0116-decimal-backport-build-fixes.patch \
  0117-smoketests-test-that-_decimal-exists.patch \
  0118-Prefer-sysconfig.python_build.patch \
  0119-distutils-remove-checks-for-ancient-gcc-binutils.patch \
  0120-distutils-split-CC-env-var-before-passing-to-subproc.patch \
  0121-_testconsole.c-Fix-casing-path-sep.patch \
  0122-Return-consistent-architecture-markers-for-python-on.patch \
  0123-distutils-add-back-gcc_version.patch \
  0124-fix-mingw-cross-compiling-in-setup.py.patch \
  0125-Use-actions-setup-python-for-setting-up-correct-vers.patch \
  0126-Fix-buffer-overflow-in-Py_GetSepW.patch \
  0127-Remove-unnecessary-strlen-in-Py_NormalizeSepsW.patch \
  0128-handle-ncursesw-pkg-config-when-cross-compiling.patch
 
  autoreconf -vfi
}

build() {
  declare -a _extra_config
  if check_option "debug" "n"; then
    _extra_config+=("--enable-optimizations")
    # FIXME: https://github.com/msys2-contrib/cpython-mingw/issues/10
    # _extra_config+=("--with-lto")
  else
    CFLAGS+=" -O0 -ggdb"
    CXXFLAGS+=" -O0 -ggdb"
    _extra_config+=("--with-pydebug")
  fi

  [[ -d "${srcdir}/build-${CARCH}" ]] && rm -rf "${srcdir}/build-${CARCH}"
  mkdir -p "${srcdir}/build-${CARCH}" && cd "${srcdir}/build-${CARCH}"

  ../Python-${pkgver}/configure \
    --prefix=${MINGW_PREFIX} \
    --host=${MINGW_CHOST} \
    --build=${MINGW_CHOST} \
    --enable-shared \
    --with-system-expat \
    --with-system-ffi \
    --with-system-libmpdec \
    --without-ensurepip \
    --without-c-locale-coercion \
    --enable-loadable-sqlite-extensions \
    --with-tzpath=${MINGW_PREFIX}/share/zoneinfo \
    "${_extra_config[@]}"

  make
}

check() {
  cd "${srcdir}/build-${CARCH}"

  # Some basic tests to ensure nothing major or MSYS2 specific features are broken
  ./python.exe "../Python-${pkgver}/mingw_smoketests.py"
  MSYSTEM= ./python.exe "../Python-${pkgver}/mingw_smoketests.py"
}

package() {
  cd "${srcdir}/build-${CARCH}"

  make -j1 install DESTDIR="${pkgdir}"

  # gdb pretty printers for debugging Python itself; to use:
  # python
  # sys.path.append('C:/msys64/mingw64/share/gdb/python3')
  # import python_gdb
  # reload(python_gdb)
  # end
  if [[ "${_primary_python}" == "yes" ]]; then
    [[ -d "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/ ]] || mkdir -p "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/
    cp -f python.exe-gdb.py "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/python_gdb.py
  fi

  # some useful "stuff"
  install -dm755 "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/Tools/{i18n,scripts}
  install -m755 "${srcdir}/Python-${pkgver}"/Tools/i18n/{msgfmt,pygettext}.py "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/Tools/i18n/
  install -m755 "${srcdir}/Python-${pkgver}"/Tools/scripts/{README,*py} "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/Tools/scripts/

  # fixup shebangs
  for fscripts in 2to3 2to3-${_pybasever} idle3 idle${_pybasever} pydoc3 pydoc${_pybasever}; do
    sed -i "s|$(cygpath -w ${MINGW_PREFIX} | sed 's|\\|\\\\|g')/bin/python${_pybasever}.exe|/usr/bin/env python${_pybasever}.exe|g" \
      "${pkgdir}${MINGW_PREFIX}"/bin/${fscripts}
  done

  # default aliases for all scripts/binaries
  if [[ "${_primary_python}" == "yes" ]]; then
    # Default names are aliases for Python now
    cp "${pkgdir}${MINGW_PREFIX}"/bin/python3.exe "${pkgdir}${MINGW_PREFIX}"/bin/python.exe
    cp "${pkgdir}${MINGW_PREFIX}"/bin/python3w.exe "${pkgdir}${MINGW_PREFIX}"/bin/pythonw.exe
    cp "${pkgdir}${MINGW_PREFIX}"/bin/python3-config "${pkgdir}${MINGW_PREFIX}"/bin/python-config
    cp "${pkgdir}${MINGW_PREFIX}"/bin/idle3 "${pkgdir}${MINGW_PREFIX}"/bin/idle
    cp "${pkgdir}${MINGW_PREFIX}"/bin/pydoc3 "${pkgdir}${MINGW_PREFIX}"/bin/pydoc
  fi

  # delete anything that could conflict with the primary Python
  if [[ "${_primary_python}" != "yes" ]]; then
    rm "${pkgdir}${MINGW_PREFIX}"/bin/python3.exe
    rm "${pkgdir}${MINGW_PREFIX}"/bin/python3w.exe
    rm "${pkgdir}${MINGW_PREFIX}"/bin/python3-config
    rm "${pkgdir}${MINGW_PREFIX}"/bin/idle3
    rm "${pkgdir}${MINGW_PREFIX}"/bin/pydoc3
    rm "${pkgdir}${MINGW_PREFIX}"/bin/2to3
    rm "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/python3-embed.pc
    rm "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/python3.pc
    rm "${pkgdir}${MINGW_PREFIX}"/share/man/man1/python3.1
  fi
}

sha256sums=('0a8fbfb5287ebc3a13e9baf3d54e08fa06778ffeccf6311aef821bb3a6586cc8'
            '60650cee2336a38745531e0c471399ecfc368700f4d28793797c302c3a50a566'
            '168a439e7aff58ed3dc8f373516ec98eb30913fc1d2f221179c203089b0edcf5'
            '38224674f5c5ffb0091823c383fe01a984df8a1ad04600d2ca8626bc56686b30'
            '09840437dd5ef3a7f95c8b82f0b848bf3b6013a75935bd7e860514a0d4816776'
            'a08b996f85450f6d0034e051319f2f251378cbad731758fe41b95a8a63d8c114'
            '936f53654f5bb61ba17b1865890c19f265985355396ac6cf44f868809156178e'
            '86c7b3a2900c8c865caf3822cb6f386e364c621df762778087238cd1dfeae5f2'
            'b7fbbfe4ee8427a1557e03ef8a882063c9c4442ad2704a5b1405bc0887a63bc7'
            'f9d8304547f4e78293c96ed19038a7204520797a337a97ff8adc3e46deb1c772'
            '5fc51578040d4d2b6ba30437a882b62a850bdfb6cab5a02e2ab073d47c5a2727'
            '3451df1a841470d5441644acaec1e3fa2a68c505c93419251ddeb673141f8297'
            'fee31a78904b3728e548a64af7172100f97b4f61db26b02b31f7ae3f4ee0d17d'
            '86867a92b3d230bb6167c04fbb0fcd479cd85823ecda49cc59490c6afae9c900'
            '3cd374775817ff1c345bb04654df07d3e363a3e3513dce19969b4710343da048'
            '5c3b83875f9bb96dfc46db2876fd11f52ff11b7ee419ab3117643527b2f7e752'
            'e1f4bf7ee19a132682088bd0afebf4e38fcfe6f61f7a068a2bd8384036f986ad'
            'e6a813338ff07bcdeab6a9a2cfd448a6abe85f9407e6f294ea938b53ece9f916'
            '8fc1ca5cc349f0101bcb6411c6727b4510f432ac449fff35941f34d6f3b30846'
            'bbe154f44ffac46b365c9100d1fba385d9fe727ee9698ce47684c82cc2c2fc0a'
            'd07b44e0461147d4b1fac4cfe7d49f95ecfe19f7e872e93c02653620b378c1ae'
            '111d535b6938515b2fe66bd0870e09f7e6110bfbd53b2b896f435de93672ba9b'
            '49f98bd4b4cb2bf26d40fe53918ef4b8ea5f366e077e24cfce265004d9e5e813'
            '727968284fa21a92dad810e444091350fac9b34aca29f772e67f6ac47e74284d'
            'a5bbaafc5eed72346f618e2d3642109f31f1e62d8025fa5ccd2a73853fb81f64'
            '95883f9bdb8b1ba84ca02e803c1aac662bb63fe3c35c18f70a1ffee07db2e760'
            '7fd66c363e37673a90189efc832647834bc2b4021169b0a4c2c3f553e2aee252'
            '418cdcca9196bb396b2c2cbfaecc54ac4858c5aaf040d97f00cd2e8fbc2101bb'
            'b467817f1b44c14ee218156a1d39007d96bbf924e8d784a97ee6247c09ca7790'
            '88c22e47524d5ee5669d0fe470863a9e602d6f033225575e07d0e40069b96021'
            '95cc396fcb39ab9cd8b0ab0118a2aab680ffd780e4223738ae6096b45637c103'
            'c4e5ca79353e3138cfca40d8e837436e0391b8a899ef4fbb12b7f8cfae70685a'
            'bf9bb6ec92e57f7ac8b8036dce564937319efe9bec789e90c9e5f535cf199a2d'
            '7642ef2113842a1d5b82d4e2975c3101d0e8a7cfcebb21618f42b99b7346710a'
            '04837a3b9a35f5ab49ad5f96a292565aaa27d3b377e6c46c41764373156235c4'
            'c1918a148aeb2c55139cd08c27974ba6edd0ef0248474a739c27ddb0e7fdba27'
            '493ebda56669d48c756cd499b6eda43b975a71a3a04aef50949e8afdb31ebb64'
            '927cf53ad8053cf04c670925dbc7ba70c98de33a1d7830c4e3f6242bba627e72'
            '7aa0e088de3f7d5ed56de08e854b0ccf7447587c031b291cb70385314ab23049'
            '782d5705129ce4432df35377cd8143a83111e03c2244ed7cc4bdc44d6ff07856'
            'e2e46ce6a0ee1dc7b88875a01be16ac8d142c8b588c5e434bfe6663c90ddf2df'
            'e3be03dc47acd14dd2f2a730c6dc5518f814d5841d62abea6a0b48efa06a4228'
            '8e5a3171da2c2b3c771b1855b7918b7326c872de7fa0d14bcb65608837cbeea2'
            'd7798e45c09f0fd38c123e7ca5224ea2554e758a6d870347c5fef6edc50b6c6d'
            'b35baeb182ce5193613029602c3975f8df62ff2914329baf2c09d3b615620b2a'
            '4fcb2f83b721e0529ce89fea66728b416f703caa49e2c169f9e23c9a60e34592'
            'a9b1a3956f208db9fff439a98535c287385a7f5e2631a4181582b8ae72a9c589'
            '92a9af8ff4295279cf647c01d84081696087d9f5af33f06079c5f5594a71b983'
            '7f89f54f228e93e7214a4c63fef63fe6114afae7e0645e2b89c1ab4b18c36403'
            '09793e3629c2e173a034e0bdd182d2d71e26675434951356839a241d0094f3cf'
            '6192d280c42f769e9ed78dcedf853e3c8f0bc8d3cc55238f0650f3699dc5c71b'
            '8811fc1885cab84ec168b75af75a1aa80a889831d750403a78701ba953171369'
            'a275aef09e2d1de2f3a86146dac64fc43c67a4316c2d357e373da9fed6da58a1'
            'ca05645a9a11218dd5af61dd29189d4987ac73835df2fd2fe2584c50b11e3a53'
            'e98878ba09845b99b1126b62fff9bff287a971a5af7a4a40d725652144e9a929'
            '4b0a7a3af45c5c3de5dfc2d4f8e22753f74dccd683ad11aabaa9efa4f71124c0'
            '5066a8e32ede96a77b012295169620bfe5e91b6976fd6688a8d014dc007c6f07'
            '2ab1246d675e3befd23c666eff2d691986526f8a07ec8932876b762ce877a668'
            '941cd99a3ce9b345af8bdcd2b260a49fa161575ee365e56e8d5074b399b33798'
            '76e840d422804f01bac1b51e936b1626b87eb867f624245aa58864706186aa81'
            '8723dbd000deff073a02c6823236dd207d524e7951fdeebe961e5c2f5e29ba21'
            '7a80ff908bf9a5e82c5664550a2fd259b037ca21cdb56aa081ff73ac0b15edf2'
            'd6c23fe6707926d2e0184b3f680766fcb669e2397157a9366405e9350addd030'
            'aa562c7b20d64175fe191cd6c00eb4550aa5d48e00031d45be67f9bea69279c0'
            'b5631dd8f2f4fafdef0c3d0becb33d63021f334fd2451c9ff4b527e6780736df'
            '36c7ca7815354e5765c0cf4b16d9a3a83b55261d0a731962c7fdde5f6912a14f'
            '271aada30e4887a290c3532bdc4820d58b2424f7866ad8374840d26e338765c2'
            '64eb809b66e4ee7bfd8aba878e6fa4ad037eeb79c8d1c1efc7a0c6a39c61d0a0'
            '586cb55731714973d904e071be3a161d21d3e99a8a18f4f266068a511e739ef8'
            'b453a6e53f3c1f0d1fa1b30e1114303123ba6a2399eafd5e0d80da1eea859042'
            '1948e440008606c888957a85511b53d88ea8f7a13860bf6bb8429f8362634730'
            '8dd42da695f2e43be5c39a68ac9d2ef7af93604e23c9aaaf55514db546a57708'
            'acfdc04626e7abc18f0b1894a80dc0761c1a62d37652dcc848c6efe952126d50'
            '0391bb4743bf857b0cfeeac44e3fd8aa4a776e5478ea7d770101857c2bc5c498'
            'ec9091d2e7bd09a6ca5697a5f443bbb1635d63b43711e08e1a9e3f76cd66df2d'
            '96ec270e675c1b0bce7d34fe86b92cedbc55d646a83f09935753f9c9a7622f00'
            '6231ae6c6b94609a03c8c1eed0ed447693f3fa97e9550cd5ac397ad4ced82c09'
            '10a186d35345e5873de3f3d5e731f4947028fda015d074069873788d4bd8ecd1'
            '64fa589875de2196724977007e3bff8f1c9d0511d1ec3f4b56b02c5deb5072ba'
            '80d92890d9439b47e776025e6431f192d6f87957ff90e418317946d72ad35d6c'
            'be9c9a3f04d690547c9590263b946d2be1365beeb9d913b6c7c3394f996bbf1c'
            '671d2bc567f0db768d9637df3500100274e82357469f955285ad0e0165142d92'
            'cb33fae278f56414e0f4596982fc587e3588c53c8ea63e9bfe31f0ede848f8f5'
            'f1c09484198dbea759f597308d7c546c3b282441f9e53e9bc69b15030c80694f'
            'fa3f0bbaeed5ad5a9a55cea1e18c68364588156f8181afe7eed4278adb87416a'
            'dc319c34eab5dcb0aaa226439fa9c9958c791aed2228d8711af71c9559654c95'
            '40a306f53d80f2086652eb6f89675587fb91f807824a2a830f28dbd744081b68'
            '5edf62f1a5058b116804d1d9a794d2773573c918d9f0bf5d8697554378c39979'
            '273df9944f409f39d64401f4f69360a434d09e382bf4d86892861e2fa86b2fb6'
            'aa818920ce83da07cd1108815172984b883af39486e017be5fc3b7d08f5dd155'
            '190056e7b1258e6ad8e04ebfcda863d6dc9e52449a874fa86629d0b3650d09c6'
            'ead7b75338b7ca9fbe76f00d861bfb6a7eed0269b6d514565564e82873cf29ef'
            '40891b0fb8e73d197a5be3483009dae171f4014c6fff0b6d38260ec749868430'
            '077e86394f2297498d0bb0e31ca182378eaaf6ec4699fe0825825714a169e486'
            '16537dc7c2541e6630d3940fb1621a2fddac23c635432c100417b9cc017c1744'
            '9ab5e7b9779c37d97d3fb8721d075ca7218e91d7f33614e2a6fc543cb2fccebe'
            '8fffbcae11339fed8bc5db8461bf33d1a21731472307095d86ce89bb70efae39'
            'fb20135c52b2d31099413e4093aa0176eac5bb8f4aadae44da9953abf99f4808'
            '60203aad4248ebca91082b2ab026255adfb91b3e97ae91517c987038463ab5b5'
            '27667a57d9d92c9845d75336e7edb181b3259da5c35503ef4b318e6933662568'
            '7c85cbde9d63d48f30411f8586f13e7193445fb7e23cd2a4e526a00f4036153d'
            '6fcb445cfb69bf303cbf218540090cb5bfcb3912ed34c9da379e2c8ddd62d02a'
            '67adb386399de2a6e1ba037b43bccc03525c34af0d2a108e062f33ee834d592b'
            '4be9c3edd0c4ede5e987e7a0ecd9c0c5d9268f9e0a0218c48246c1c7b14bc92e'
            '9bd54319dee4744f96dcd2af76293772a4c70c28fed217c704209f69d070647a'
            'c6bf66856da49ea29d8e3a6abb8a998a4281ecbf012e205f6d950dc50b417507'
            '3db41a2f58ea08abfa56269c3385c4c88c28e7f5f3d8705cea1e23f2882ec84e'
            'd6146f24a1318b7a110d3670b425c44288cfb70ea9289eed991ca887afef8bd3'
            '70ea4ad3da593ffe72365fdfeada65e93d1d4abb738513ecebd463a79ee5ddf7'
            '83d522bd0cfd1b428f77d3ba9e3e96372c41c30ee6355630697cb97e17016cd5'
            '026719b4a09d296a4fc6bfb46137674f10915cb331c38a2914344d549fdc9277'
            '1e29a61bd6af94ede2f02aa9cd30f827b5323b13d47350d3d799b9af9acc49c5'
            'b5a9ed1d214ab2e60c7e8db29dedcf8a19a9aad3f333016478368fd8edd34f29'
            '8006557662ded0093128676c00d79e77a91d383634a88d3fefeadaf9442001d2'
            'f0e2052e660c25997c096e4364d1c6f257d7f2dbd2631f18505d0a009535e92b'
            '8ede2976cabf1f5bb0892b5682db4992c0551f44adc547261a4553b53169ed2c'
            'c1544e7891eade882aeeaa4086255b31a9026891d87868705f3713755c084eba'
            'ec48b3816cc73080859c2252f1ce6a6a9f15890b15e133d07a69191f7d68da33'
            'a300004ba6b22874997c93cbf6e1f9e8eb1b6b286c464bfac4d02f4974d1a5dd'
            '7cd30e9a8877c03ddcbc306c444e3080b6f6fc1b4f8e037c0d9f61a322b77264'
            '8a4b437f2d077a184743c2c628d92ac2d87cae3b16aaae73c0a5ca1aa5ecdaff'
            'c81ce6b1924df5cee69d02694abbf198e8050d803e5d009df16d557cb3607414'
            '9bd3388aacac702ff3f73fb6d076ac91e5a4775e9317ac4d683100f38b9db62e'
            '04318674b0493d8f844bd1792209615e661ad702f3aacb10f2210458c99e1cfd'
            'e77aab9e9bf6c070c9c51b85d20d2ab35e227fd9d214a928c70ea1bbc3a5c1d9'
            'b89e281b8ed5e036ed76b8fe1dc4cca27bc53181c1acb844a546fe33a862d782'
            'df7751b5e4d4973f6610dcf4b069395e0cc91c5f23842c54deb9ae31cf1220c9'
            'c190aad285352d3084052b1dee2dfc5637b4d3c2b9826cea0be59f92a23eda05'
            'ee691f942441376b359abe8ee42cf5c915a51c69b8b73a0a504dd978bdbb519e')
